<template>
	<view class="box">
		<block v-if="!boxHide">
			<rich-text :nodes="info"></rich-text>
		</block>
		<Loading ref="load"></Loading>
	</view>
</template>

<script>
	import Loading from "../../../components/loading/loading.vue"
	export default{
		components:{
			Loading
		},
		data(){
			return{
				info:"",
				boxHide:true
			}
		},
		onLoad(options) {
			uni.setNavigationBarTitle({
				title:options.title
			})
			this.$refs.load.initLoading({loadType:1}).then(res =>{
				this.boxHide = false;
				this.$api.getLibraryInfo({material_id:options.id}).then(res => {
					this.$refs.load.getLoadingData({}).then(ress => {
						this.info = res.content;
					});
				})
			})
		}
	}
</script>

<style>
	.box{padding: 30upx;box-sizing: border-box;}
</style>
